<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>产品:${product.PName }的详情</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		body {TEXT-ALIGN: center;}
		#order_detail {
			MARGIN-RIGHT: auto;
			MARGIN-LEFT: auto;
		}
	</style>
  </head>
  
  <body>
  <div id='order_detail'>
	 
	 <table width="500" border="1" align="center">
	   <tr>
	     <td>商品编号</td>
	     <td>${product.PId}</td>
	   </tr>
	   
	   <tr>
	   	<td>商品名称</td>	
	   	<td>${product.PName}</td>
	   </tr>
	   
	   <tr>
	   	<td>商品型号</td>
	   	<td>${product.model }</td>
	   </tr>
	   
	   <c:forEach items="${product.prices}" var="price" varStatus="status">
	   	<tr>
	   	<td>
			<c:choose>
				<c:when test="${status.count == 1}">
					单价
				</c:when>
				<c:when test="${status.count == 2}">
					会员单价
				</c:when>
				<c:when test="${status.count == 3}">
					VIP单价
				</c:when>
			</c:choose>
		</td>
	     <td>${price.price }</td>
	     
	   	</tr>
	   </c:forEach>  

	 </table>
	 <a href='#' onclick="return window.close()">关闭</a>
  </div>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  </body>
</html>
